package com.kevin.learn.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kevin.learn.entity.User;
import com.kevin.learn.mapper.UserMapper;
import com.kevin.learn.service.UserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userServiceImpl")
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> selectPageVo(Page<User> page, Integer state) {
        IPage<User> userIPage = userMapper.selectPageVo(page, state);
        return userIPage.getRecords();
    }

}